

import { SpriteFrameComponent } from "../../engine/SpriteFrameComponent";
import ViewBase from "../../engine/ViewBase";
import { GameConfig } from "../config/GameConfig";
import { UIHelper } from "../util/UIHelper";

const { ccclass, property } = cc._decorator;

@ccclass
export default class ViewRule extends ViewBase {

    private gameType: number = GameConfig.Game_Type.huanghua_mj;


    onEnable(): void {
        super.onEnable();
     
        this.refresh()
    }

    private refresh() {
    //     for (let i = 0; i < this.btnGameList.length; i++) {
    //         let ruleNode: cc.Node = this.findChild(this.node, "scrollView/view/content/ruleNode" + i)
    //         if (this.gameType == (i + 1)) {
    //             ruleNode.active = true
    //             this.btnGameList[i].getComponent(cc.Sprite).spriteFrame = this.btnGameList[i].getComponent(SpriteFrameComponent).spriteFrameList[1]
    //         } else {
    //             ruleNode.active = false
    //             this.btnGameList[i].getComponent(cc.Sprite).spriteFrame = this.btnGameList[i].getComponent(SpriteFrameComponent).spriteFrameList[0]
    //         }

    //     }
    }
}
